package com.lsh.payment.core.model.config;

import com.lsh.payment.core.model.BaseVender;

import java.io.Serializable;

/**
 * @author peter
 */
public class PayConfig extends BaseVender implements Serializable {
    /**
     * 添加注释
     */
    private Integer id;

    /**
     * 配置名称
     */
    private String name;

    /**
     * 配置内容
     */
    private String content;

    /**
     * 是否有效
     */
    private Integer isValid;

    /**
     * 配置类型
     */
    private Integer configType;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public Integer getIsValid() {
        return isValid;
    }

    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }

    public Integer getConfigType() {
        return configType;
    }

    public void setConfigType(Integer configType) {
        this.configType = configType;
    }

    private PayConfig(Builder b) {
        id = b.id;
        name = b.name;
        content = b.content;
        isValid = b.isValid;
        configType = b.configType;
    }

    public PayConfig() {
        super();
    }

    public static class Builder {
        /**
         * 添加注释
         */
        private Integer id;

        /**
         * 配置名称
         */
        private String name;

        /**
         * 配置内容
         */
        private String content;

        /**
         * 是否有效
         */
        private Integer isValid;

        /**
         * 配置类型
         */
        private Integer configType;

        public Builder id(Integer id) {
            this.id = id;
            return this;
        }

        public Builder name(String name) {
            this.name = name;
            return this;
        }

        public Builder content(String content) {
            this.content = content;
            return this;
        }

        public Builder isValid(Integer isValid) {
            this.isValid = isValid;
            return this;
        }

        public Builder configType(Integer configType) {
            this.configType = configType;
            return this;
        }

        public PayConfig build() {
            return new PayConfig(this);
        }
    }
}